<?php
	ob_start() ;
	include("main.php");
	$page = $_REQUEST['page'];
	$id = strtolower(trim($_REQUEST['id']));	
	$pid = $_REQUEST[pid];
	if($page == 'shop') {
		query::shop($id);
		query::products($id);		
		header("location:".(config::getURL())."cuahang.php?id=".$id); 
	}else if($page == 'sanpham') {	
		$temp =  explode('_',$id);
		$tbl = strtolower(trim($temp[0]));
		query::shop($id); 
		query::product($tbl,$pid);
		header("location:".(config::getURL())."sanpham.php?id=".$id."&pid=".$pid); 
	}
	ob_flush() ;
?>